Skip to main content
Version: Next

Disease Detection

The flagship feature of the project where users can upload photocopy of their recent scan i.e. xray, mri, skin, etc to get a ai-based prediction about what might gone wrong with the body part.

How it works

Your medical images like X-rays and MRIs are fed into a special kind of AI called a "Convolutional Neural Network" (CNN). Imagine this network as a web of interconnected neurons, much like the human brain. But instead of thoughts, these neurons process visual information.

Here's the magic: these neurons have been trained on massive datasets of labeled medical images, learning to recognize patterns linked to specific diseases. Just like doctors identify pneumonia in X-rays, our CNNs do the same, automatically extracting those crucial clues.

Think of it this way: when you feed in a new image, the CNN analyzes it, calculates the probability of each possible disease, and presents it like a scorecard. It doesn't diagnose, but helps doctors see potential issues they might miss.

Data Collection

Data for training the model was primarily collected from kaggle, and other open-source platforms and might be subjected to change in the future. Other than that, for some specific diseases (like Pneumonia, Tuberculosis, etc) data was collected from other publicly available datasets other than from kaggle.

Data Preparation & Model Training

Since, the data collected was not upto the mark, it was augmented (i.e. Randomly flipped and rotated) to increase the size of datasets. After which the images are resized to 256x256 and then fed into the model for training. Below is the architecture of the model used for training the data.

Model: "sequential_6"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
sequential_1 (Sequential) (None, 256, 256, 3) 0

conv2d_24 (Conv2D) (32, 256, 256, 64) 256

max_pooling2d_24 (MaxPoolin (32, 128, 128, 64) 0
g2D)

conv2d_25 (Conv2D) (32, 128, 128, 64) 4160

max_pooling2d_25 (MaxPoolin (32, 64, 64, 64) 0
g2D)

conv2d_26 (Conv2D) (32, 62, 62, 64) 36928

max_pooling2d_26 (MaxPoolin (32, 31, 31, 64) 0
g2D)

conv2d_27 (Conv2D) (32, 30, 30, 64) 16448

max_pooling2d_27 (MaxPoolin (32, 15, 15, 64) 0
g2D)

conv2d_28 (Conv2D) (32, 14, 14, 64) 16448

max_pooling2d_28 (MaxPoolin (32, 7, 7, 64) 0
g2D)

conv2d_29 (Conv2D) (32, 6, 6, 64) 16448

max_pooling2d_29 (MaxPoolin (32, 3, 3, 64) 0
g2D)

flatten_4 (Flatten) (32, 576) 0

dense_8 (Dense) (32, 64) 36928

dense_9 (Dense) (32, 2) 130

=================================================================
Total params: 127,746
Trainable params: 127,746
Non-trainable params: 0
_________________________________________________________________

The model was trained using the Adam optimizer with a learning rate of 0.001 and a batch size of 32. The model was trained for 15 epochs and was stopped by using early stoppage callback in tensorflow.

Model Evaluation

The trained model was trained upon 10% of the complete dataset and all metrics were given based upon this tests. The model was evaluated using the following metrics: Accuracy, Precision, Recall, F1-Score, ROC-AUC, and plotting the confusion matrix.

Limitations

While our disease detection system has shown promising results, it does have some limitations:

Limited to specific diseases

Our system is currently designed to detect specific diseases that it has been trained on. It may not be able to accurately detect other diseases or conditions that are not included in its training data.

Dependent on image quality

The accuracy of our system heavily relies on the quality of the uploaded medical images. Poor image quality, such as low resolution or artifacts, may affect the system's ability to make accurate predictions.

False positives and false negatives

Like any AI-based system, our disease detection system is not perfect and may produce false positives (incorrectly identifying a disease) or false negatives (missing the presence of a disease). It is important to consult a medical professional for a definitive diagnosis.

Limited to certain body parts

Currently, our system focuses on detecting diseases related to specific body parts, such as the lungs, bones, or skin. It may not be suitable for detecting diseases in other body parts or systems.

Data availability and bias

The accuracy and generalizability of our system depend on the availability and diversity of the training data. If the training data is biased or lacks representation from certain demographics, the system's performance may be affected.

The use of AI-based disease detection systems may be subject to regulatory and legal considerations, such as data privacy, patient consent, and compliance with medical regulations. It is important to ensure compliance with applicable laws and regulations when using our system.

Please note that our system is not intended to replace medical professionals or provide a definitive diagnosis. It should be used as a supportive tool to aid in the detection and identification of potential health issues. Always consult a qualified healthcare provider for medical advice and diagnosis.

Mitigating False Positives

To address the issue of false positives in our disease detection system, we have implemented a questionnaire that asks users around 10 specific questions related to the classified disease. These questions help to further refine the prediction and reduce the chances of false positives.

By gathering additional information from the user, such as symptoms, medical history, and other relevant factors, we can improve the accuracy of the system's predictions. This approach allows us to consider a more comprehensive set of factors before making a final determination.

However, it is important to note that while this questionnaire helps to mitigate false positives, it does not guarantee 100% accuracy. It is still recommended to consult a medical professional for a definitive diagnosis.

Data Privacy

At SwasthAI, we prioritize the privacy and security of our users' data. We understand the sensitivity of medical information and take all necessary measures to ensure that your data remains confidential.

When using our disease detection system, all processing and analysis are performed locally on your device. We do not send any of your medical images or personal data to our servers. Your data stays within the confines of your device, providing an added layer of privacy and security.

We do not store any of your medical images or personal information on our servers. Once the analysis is complete, the results are displayed on your device's screen and are not stored or transmitted anywhere else.

By keeping the entire process on-device, we aim to provide you with peace of mind and full control over your data. You can rest assured that your medical information remains private and secure.

Please note that while we take every precaution to protect your data, it is important to ensure the security of your device and follow best practices for data protection.